<script>
function prize_submit_invite_code (inputItem)
{
    var code = $(inputItem).val();
    if (code)
    {
        url = '/guider/prize';
        $.post(url, { code: code }, function (o) {
                    var index = layer.load(0);
                    layer.close(index);
                    if (o.status == 0)
                    {
                        window.location.reload();
                    }
                    else if (o.message)
                    {
                        layer.msg(o.message);
                    }
                    else
                    {
                        layer.msg('系统错误，请重试');
                    }
                }, 'json');
    }
    else
    {
        layer.tips("邀请码不能为空", inputItem, { tips: 3 });
    }
}
</script>
